<?php
    $servername = "localhost";
    $username = "tfsgz";
    $password = "2ZEcT4PW6m8wfEHA";
    $mysqlname = "tfsgz"; 
    
    $id = $_POST['id'];
	$type = $_POST['type'];
	$name = $_POST['name'];
	$zhan = $_POST['zhan'];
	
	
    $conn = mysqli_connect($servername, $username, $password, $mysqlname);
    $sql = "UPDATE tuan SET type = '$type', name = '$name', zhan = '$zhan' WHERE id = '$id'";
    $result = $conn->query($sql);

    if($result){
		echo '修改成功';
	}else{
		echo "修改失败";
	}
    
?>